﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using OpenCompiler.Scanning.Scanners;

namespace OpenCompiler.Scanning.Tests.Specs_for_scanner
{
	[TestClass]
	public class When_scanning_for_operators
	{
		[TestMethod]
		public void In_if_statement_operators_are_tokenized()
		{
			const string sourceFormat = "if(true{0}false){{}}";
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operator, OperatorScanner>(sourceFormat, 8, 3);
		}

		[TestMethod]
		public void In_boolean_expression_operators_are_tokenized()
		{
			const string sourceFormat = "bool myResult=true{0}false;";
			TokenTestHelper.TestForTokenBasedOnValuesInEnum<Operator, OperatorScanner>(sourceFormat, 7, 4);
		}
	}
}